﻿using System.Collections.Generic;
using Microsoft.TeamFoundation.WorkItemTracking.Client;
using Nuwanda.Common;
using System.Diagnostics;

namespace Nuwanda.TfsSpotlight.Data
{
    /// <summary>Describes a TFS project</summary>
    [Author("Bartłomiej Legiędź")]
    public class ProjectDescriptor
    {
        /// <summary>Name of the project</summary>
        public string Name { [DebuggerStepThrough] get; private set; }

        /// <summary>List of project's queries</summary>
        public List<QueryDescriptor> Queries { [DebuggerStepThrough] get; private set; }

        /// <summary>A server that the project belongs to</summary>
        public ServerDescriptor Server { [DebuggerStepThrough] get; private set; }

        /// <summary>List of workitem types associated with project</summary>
        public List<WorkItemType> WorkItemTypes { get; set; }

        /// <summary>List of all build types defined.</summary>
        public List<BuildDescriptor> BuildTypes { get; set; }

        public ProjectConfiguration Configuration { get; set; }

        public ProjectDescriptor(string name, ServerDescriptor server)
        {
            this.Name = name;
            this.Server = server;
            this.Queries = new List<QueryDescriptor>();
            this.WorkItemTypes = new List<WorkItemType>();
            this.BuildTypes = new List<BuildDescriptor>();
        }
    }
}
